1. Field of the Invention
The present invention relates in general to a method for producing an image. In particular, the present invention relates to a method for image-based rendering of light in a virtual volume.
2. Description of the Related Art
The images of a three-dimensional object are often used in industrial design, motion pictures, and even in virtual reality and homepage making, etc. The images may be enlivened by drawing them with a lightening effect. A conventional method for providing such a lightening effect includes the following steps: setting the position and the intensity from a virtual light source in the virtual space after drawing the image of a three-dimensional object; and calculating the distribution of light intensity while the light of the virtual light source illuminating the three-dimensional object, so that the image of the three-dimensional object is redrawn to show the lightening effect. This conventional light rendering method cannot provide various lightening effects since it only provides a virtual light source and then calculates the light intensity distribution of illumination of the light source on the object. Moreover, this conventional method is only applicable in case that the light source is located in the front of the object. If the light source is located in the rear of the object, only the shadow of the object can be observed.
Accordingly, an object of the present invention is to provide a method for image-based rendering of light in a virtual volume, which can provide various illuminating effects for a virtual three-dimensional object.
Another object of the present invention is to provide a method for image-based rendering of light in a virtual volume, in which the virtual light sources can be located at arbitrary positions, so that various illuminating effects can be provided to the virtual three-dimensional object.
In order to achieve the above objects, the present invention separates the light sources in the rear of and in the front of the object into two groups. The illuminating effects of the light sources in the rear of the object are first merged one-by-one. The merged image for the illuminating effects of the light sources is then merged with the image of the three-dimensional object. Thereafter, the images for the illuminating effects of the light sources in front of the object are sequentially merged. The merged image for the illuminating effects is calculated with a special function to obtain an image having a special effect. The image having a special effect is then merged with the merged image of the object and the illuminating effect of the rear light sources in a certain merging mode.